{% extends "pretixcontrol/items/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}{% trans "Product category" %}{% endblock %}
{% block inside %}
    <nav id="event-nav" class="header-nav">
        <div class="navigation">
            <div class="navigation-title">
                <h1>{% trans "Product category" %}</h1>
            </div>
            {% include "pretixcontrol/event/component_link.html" %}
        </div>
    </nav>
	<form action="" method="post" class="form-horizontal">
		{% csrf_token %}
        {% bootstrap_form_errors form %}
        <div class="row">
            <div class="col-xs-12{% if category %} col-lg-10{% endif %}">
                <fieldset>
                    <legend>{% trans "General information" %}</legend>
                    {% bootstrap_field form.name layout="control" %}
                    <div class="internal-name-wrapper">
                        {% bootstrap_field form.internal_name layout="control" %}
                    </div>
                    {% bootstrap_field form.description layout="control" %}
                    {% bootstrap_field form.is_addon layout="control" %}
                </fieldset>
            </div>
            {% if category %}
                <div class="col-xs-12 col-lg-2">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">
                                {% trans "Category history" %}
                            </h3>
                        </div>
                        {% include "pretixcontrol/includes/logs.html" with obj=category %}
                    </div>
                </div>
            {% endif %}
        </div>
		<div class="form-group submit-group">
            <button type="submit" class="btn btn-primary btn-save">
                {% trans "Save" %}
            </button>
		</div>
	</form>
{% endblock %}
